<template>
  <div class="citylist">
    <van-nav-bar
      title="城市列表"
      left-arrow
      @click-left="$router.back()"
    />

<van-index-bar  :index-list="indexList" >
  <div v-for="(item,index) in indexList" :key="index">
  <van-index-anchor  :index="item" />
  <van-cell title="文本" />
  <van-cell title="文本" />
  <van-cell title="文本" />
  </div>
</van-index-bar>

  </div>
</template>

<script>
import { city } from '@/api/user'
export default {
  data () {
    return {
      indexList: ['#', '热', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']
    }
  },
  async created () {
    const res = await city()
    console.log(res)
  }
}
</script>

<style>

</style>
